// To parse this JSON data, do
//
//     final chatRoomInfoData = chatRoomInfoDataFromJson(jsonString);

import 'dart:convert';

///
/// 聊天室信息模型
///
ChatRoomInfoData chatRoomInfoDataFromJson(String str) => ChatRoomInfoData.fromJson(json.decode(str));

String chatRoomInfoDataToJson(ChatRoomInfoData data) => json.encode(data.toJson());

class ChatRoomInfoData {
  String? name;
  final String? description;
  final List<String> tags;
  final String? mode;

  ChatRoomInfoData({
    this.name,
    this.description,
    this.tags = const [],
    this.mode,
  });

  factory ChatRoomInfoData.fromJson(Map<String, dynamic> json) => ChatRoomInfoData(
        name: json["name"],
        description: json["description"],
        tags: List<String>.from(json["tags"].map((x) => x)),
        mode: json["mode"],
      );

  Map<String, dynamic> toJson() => {
        "name": name,
        "description": description,
        "tags": List<dynamic>.from(tags.map((x) => x)),
        "mode": mode,
      };
}
